package com.example.jizhang.demos.dto;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * AccountInfoDTO 数据接收层
 * @author 86195
 */
@Data
public class AccountInfoDTO implements Serializable {
    private Integer infoId;

    private String infoName;

    private Integer infoType;

    private Double infoNum;

    private Date infoTime;

    private String infoCode;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AccountInfoDTO other = (AccountInfoDTO) that;
        return (this.getInfoId() == null ? other.getInfoId() == null : this.getInfoId().equals(other.getInfoId()))
            && (this.getInfoName() == null ? other.getInfoName() == null : this.getInfoName().equals(other.getInfoName()))
            && (this.getInfoType() == null ? other.getInfoType() == null : this.getInfoType().equals(other.getInfoType()))
            && (this.getInfoNum() == null ? other.getInfoNum() == null : this.getInfoNum().equals(other.getInfoNum()))
            && (this.getInfoTime() == null ? other.getInfoTime() == null : this.getInfoTime().equals(other.getInfoTime()))
            && (this.getInfoCode() == null ? other.getInfoCode() == null : this.getInfoCode().equals(other.getInfoCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInfoId() == null) ? 0 : getInfoId().hashCode());
        result = prime * result + ((getInfoName() == null) ? 0 : getInfoName().hashCode());
        result = prime * result + ((getInfoType() == null) ? 0 : getInfoType().hashCode());
        result = prime * result + ((getInfoNum() == null) ? 0 : getInfoNum().hashCode());
        result = prime * result + ((getInfoTime() == null) ? 0 : getInfoTime().hashCode());
        result = prime * result + ((getInfoCode() == null) ? 0 : getInfoCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", infoId=").append(infoId);
        sb.append(", infoName=").append(infoName);
        sb.append(", infoType=").append(infoType);
        sb.append(", infoNum=").append(infoNum);
        sb.append(", infoTime=").append(infoTime);
        sb.append(", infoCode=").append(infoCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}